#include "Objet.h"
#include "Intersection.h"

void Objet::intersectionOptimisee(const Rayon &r, Intersection &i){
	// boite englobante
	if (boite.isUsed()) {
		if (boite.intersection(r)) {
			intersection(r, i);
		}
		else {
			i.setNull(true);
		}
	}
	else {
		intersection(r, i);
	}
}